package com.example.purplestarcb.shoujizhushou;

import java.util.List;

/**
 * Created by PurpleStarCB on 2015/3/24.
 */
public class SendSMS {

    public void sendSMS(String phoneNumber, String message) {
        // 获取短信管理器
        android.telephony.SmsManager smsManager = android.telephony.SmsManager.getDefault();
        // 拆分短信内容（手机短信长度限制）
        List<String> divideContents = smsManager.divideMessage(message);
        for (String text : divideContents) {
            smsManager.sendTextMessage(phoneNumber, null, text, null, null);
        }
    }


}
